package week03.day01;

import java.util.Scanner;

/**
 *  switch(表达式){
 *      case 值1：表达式1：break;
 *      case 值2：表达式2：break;
 *      ......
 *      case 值n：表达式n：break;
 *      [default:表达式n+1]
 *  }
 *
 */

public class 多分支语句之Switch语句 {
    public static void main(String[] args) {
        //输入星期几 输出对应的英语单词
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入星期几：");
        String s = scanner.next();
        switch (s){
            case "星期一": System.out.println("Monday");break;
            case "星期二": System.out.println("Tuesday");break;
            case "星期三": System.out.println("Wednesday");break;
            case "星期四": System.out.println("Thursday");break;
            case "星期五": System.out.println("Friday");break;
            case "星期六": System.out.println("Saturday");break;
            case "星期天": System.out.println("Sunday");break;
            case "星期日": System.out.println("Sunday");break;
            default:
                System.out.println("输入错误！");
        }
    }
}
